package com.example.web.entity;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SequenceConfig {
    private String id;
    
    @NotBlank(message = "配置名称不能为空")
    private String name;
    
    @NotBlank(message = "配置编号不能为空")
    private String code;
    
    private String completion; // 补全长度：true/false
    
    private Integer length;
    
    private String valueRange; // 取值范围：true/false
    
    private String prefixType; // 前缀类型：TIME/TEXT
    
    private String timePrefix; // 时间前缀格式
    
    private String prefix; // 编号前缀
    
    private String suffixConf; // 后缀配置：true/false
    
    private String suffix; // 后缀
    
    private Long minValue;
    
    private Long maxValue;
    
    @NotNull(message = "步长不能为空")
    private Integer step;
    
    private String cycle; // 是否循环：0-否，1-是
    
    private String creator;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    
    private String updater;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    
    private Boolean deleted;
}
